^G 1, E^G 2
   HOME

TheInfoList



OR:

A bell code (sometimes bell character) is a device control code originally sent to ring a small electromechanical bell on
tickers Ticker can mean: * Ticker tape, the paper strip output by a stock ticker machine * Ticker symbol, codes used to uniquely identify publicly traded companies on a stock market * News ticker, a small screen space on television news dedicated ...
and other teleprinters and teletypewriters to alert operators at the other end of the line, often of an incoming message. Though tickers punched the bell codes into their Ticker tape, tapes, printers generally do not print a character when the bell code is received. Bell codes are usually represented by the label "BEL". They have been used since 1870 (initially in Baudot code). To maintain backward compatibility, video display computer terminal, terminals (VDTs) that replaced teletypewriters included speakers or buzzers to perform the same function, as did the personal computers that followed. Modern terminal emulators often integrate the warnings to the desktop environment (e.g., the macOS Terminal (macOS), Terminal will play the system warning sound) and also often offer a silent ''visual bell'' feature that flashes the terminal window briefly.


Representations

In ASCII and Unicode the character with the value 7 is BEL. It can be referred to as control-G or in caret notation. Unicode also includes a character for the visual representation of the bell code, "symbol for bell" (␇) at U+2407, and graphic for the control code (⍾) at U+237E. In the 5-bit Baudot codes, BEL is represented by the number 11 (0x0B) when in "figures" mode. In the programming languages C (programming language), C (created in 1972) and Python (programming language), Python (created in 1991), the bell character can be placed in a string or character constant with \a. ('a' stands for "alert" or "audible" and was chosen because \b was already used for the backspace character.)


Usage

On Unix-like systems, or on MS-DOS or Microsoft Windows, Windows, a user can cause the equivalent of ringing the bell to happen by typing at the command line interpreter, command prompt the command: echo ^G where the is produced by holding down and typing . On Unix the user may need to type + first to "quote" the . On POSIX systems, one may also use: printf '\a' and in the Bash (Unix shell), Bash shell, one may use ANSI-C quoting:ANSI-C quoting
/ref> echo $'\a' An alternative is to use the tput command, which as a part of the ncurses library is available on most Unix/Linux operating systems: tput bel A program can get the same result by printing the BEL character to a terminal. On modern systems this may not make a noise; it may instead make a visual indication such as flashing the screen, or do nothing at all.


See also

* C0 and C1 control codes (ISO 646)


References


ATIS Telcom Glossary

Free On-Line Dictionary of Computing, 'bell'
{{DEFAULTSORT:Bell Character Control characters